package {

	/**
	 * @author wolf
	 */
	public class TextManager {
		
		private  var positivMessages:Array = new Array("Yes, Prince <name> you are on the right way to win the competition!",
												"I see a great future in you prince <name> as king of my empire!",
												"I see a great future in you prince <name> as king of my empire",
												"You will never have to care about your poverty; you are going to be rich \nand powerful prince <name>!",
												"Think about all this landscape around the castle prince <name>, it will be all yours if you win!",
												"My daughter couldn’t get a better husband as you are prince <name>!",
												"You are just one step away to win this, don’t give prince <name> a chance to win!",
												"It could be one stone which changes everything, be careful prince <name>!",
												"Nice work prince <name>, keep on going prince <name> you are in the lead.",
												"And if you don’t want my daughter you can get everything else, just win prince <name>!",
												"Nice move prince <name> you are on the right way",
												"Your strategy is nice prince <name> but will it be the better one?");
		private  var negativMessages:Array = new Array("Hey, Prince <name> Hurry or Prince <name2> will get my daughter!",
												"Prince <name> what are you waiting for? Your tower is to small!",
												"Do you really want to get \nmy daughter prince <name>? Start building upwards!",
												"Prince <name> I hope that is just the beginning of your strategy!",
												"Don’t be a fool, show him the real man prince <name>",
												"Keep going prince <name>, keep going, you are behind",
												"You don’t earn my daughter prince <name>, stop trying",
												"Don’t you think you should start building prince <name>",
												"Try to destroy prince <name2>s Tower, than you are in the lead prince <name>",
												"You disappoint me prince <name>, I thought you are more than a poor farmer",
												"Do you think this is an architecture competition prince <name>",
												"Stable or unstable, that’s not the question prince <name>!",
												"Stop thinking about how it would be with her prince <name>, first you have to get in the lead",
												"Come on prince <name>, is this your strategy?");
		
		public function TextManager():void{
		}
		public function getRandomIntheLeadText(playername1:String,playername2:String): String{
			var ret:String;
			var i:Number = positivMessages.length-1;
			var index:uint = Math.random()*i;
			trace("negativ"+index);
			ret = positivMessages[index];
			ret=ret.replace( "<name>",playername1);
			ret=ret.replace("<name2>",playername2);
			return ret;
		}
		public function getRandomBehindText(playername1:String,playername2:String): String{
			trace("players"+playername1+" "+playername2);
			var ret:String;
			var i:Number = negativMessages.length-1;
			var index:uint = Math.random()*i;
			trace("negativ"+index);
			ret = negativMessages[index];
			ret=ret.replace( "<name>",playername1);
			ret=ret.replace("<name2>",playername2);
			return ret;
		}
	}
}
